{{#each this}}
    {{#if group}}
        <div class="btn-group">
            <button type="button" class="btn btn-default btn-sm">{{#if text}}{{text}}{{/if}}</button>
            <button type="button" class="btn btn-default btn-sm dropdown-toggle" style="margin-left: 0px;"
                    data-toggle="dropdown">
                <span class="caret"></span><span class="sr-only">Toggle Dropdown</span>
            </button>
            <ul class="dropdown-menu" role="menu">
                <li>
                    <div class="btn-group-vertical">
                        {{#each group}}
                            {{#if href}}
                                <a href="{{href}}" {{#if target}}target="{{target}}"{{/if}}
                                   class="btn btn-primary btn-sm {{className}}">
                                    {{#if icon}}<i class="fa {{icon}}"></i>{{/if}} {{#if text}}{{text}}{{/if}}
                                </a>
                            {{^}}
                                <button class="btn btn-primary btn-sm {{className}}" {{#if attrs}}{{{attrs}}}{{/if}}>
                                    {{#if icon}}<i class="fa {{icon}}"></i>{{/if}} {{#if text}}{{{text}}}{{/if}}
                                </button>
                            {{/if}}
                        {{/each}}
                    </div>
                </li>
            </ul>
        </div>
    {{^}}
        {{#if href}}
            <a href="{{href}}" {{#if target}}target="{{target}}"{{/if}}
               class="btn btn-primary btn-sm {{className}}">
                {{#if icon}}<i class="fa {{icon}}"></i>{{/if}} {{#if text}}{{text}}{{/if}}
            </a>
        {{^}}
            <button class="btn btn-primary btn-sm {{className}}" {{#if attrs}}{{{attrs}}}{{/if}}>
                {{#if image}}<img src="{{image}}">{{/if}}
                {{#if icon}}<i class="fa {{icon}}"></i>{{/if}} {{#if text}}{{{text}}}{{/if}}
            </button>
        {{/if}}
    {{/if}}
{{/each}}